package com.example.wujinapi.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.wujinapi.entity.Favourites;
import com.example.wujinapi.entity.Products;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * (Favourites)表数据库访问层
 *
 * @author makejava
 * @since 2023-07-10 22:36:08
 */
@Mapper
public interface FavouritesDao extends BaseMapper<Favourites> {
    @MapKey("id")
    @Select("SELECT * FROM favourites where userid=#{userid} order by createtime desc")
    List<Map<String,Object>> selectPageVo(@Param("userid") Integer userid, IPage<Favourites> page);
}

